<!DOCTYPE html>
<html lang="cn">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">


  <title>灌水论坛</title>

  <link href="css/bootstrap.min.css" rel="stylesheet">
  <link href="css/index.css" rel="stylesheet">
</head>

<body>
  <div id="app">
    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <a class="navbar-brand" href="zhuce.html">注册</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">

          <div class="navbar-form navbar-right" v-if="!user">
            <div class="form-group">
              <input type="text" v-model="tbUser.username" placeholder="账号" class="form-control">
            </div>
            <div class="form-group">
              <input type="password" v-model="tbUser.password" placeholder="密码" class="form-control">
            </div>
            <button @click="login();" class="btn btn-success">登录</button>
            <div class="error" v-if="error" v-html="error"></div>
          </div>

          <div class="navbar-header navbar-right" v-if="user">
            <a class="navbar-brand" @click="logout();">退出登录</a>
          </div>


        </div>
      </div>
    </nav>


    <div class="jumbotron">
      <div class="container">
        <h1>灌水论坛</h1>
        <p>如果你对生活充满向往，如果你喜欢这个世界就如同我喜欢你，这个论坛可以随意灌水，只要你喜欢</p>
        <p><a class="btn btn-primary btn-lg" href="fatie.html" role="button">我要灌水 &raquo;</a></p>
      </div>
    </div>

    <div class="container">
      <div class="row">
        <div v-for="d in list">
          <div class="col-md-4">
            <h2>{{d.subName}}</h2>
            <p>{{d.subInfo}}</p>
            <p><a class="btn btn-default" href="#" role="button">查看更多内容 &raquo;</a></p>
          </div>
        </div>
      </div>

      <hr>

      <footer>
        <p>&copy; 2019 ahai.</p>
      </footer>
    </div>
  </div>
  <script src="libs/axios.min.js"></script>
  <script src="libs/vue.min.js"></script>
  <script src="libs/myutil.js"></script>
  <script src="js/index.js"></script>
</body>

</html>